-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New pose proposal: support rotation in degrees (#252) #589
Conversation
bd76451
to
01b01d6
Compare
@aaronchongth My understanding according the the updated proposal was that the "simpler" implementation would use the <!-- Read as (x y z roll pitch yaw), with rotation in radians -->
<pose>1 2 3 0.4 0.5 0.6</pose>
<!-- Read as (x y z roll pitch yaw), with rotation in radians -->
<pose rotation_type="rpy_radians">1 2 3 0.4 0.5 0.6</pose>
<!-- Read as (x y z roll pitch yaw), with rotation in degrees -->
<pose rotation_type="rpy_degrees">1 2 3 0.4 0.5 0.6</pose>
<!-- Read as (x y z W X Y Z), with rotation in quaternions -->
<pose rotation_type="rpy_qwxyz">1 2 3 0.707 0.707 0 0</pose> Do you mind updating this PR to support |
95da234
to
8480dd6
Compare
Codecov Report
@@ Coverage Diff @@
## main #589 +/- ##
==========================================
- Coverage 87.54% 87.46% -0.08%
==========================================
Files 72 72
Lines 10514 10557 +43
==========================================
+ Hits 9204 9234 +30
- Misses 1310 1323 +13
Continue to review full report at Codecov.
|
This has a weird smell; I think this code (if it works) is doing too much. If |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass done, PTAL!
Codecov Report
@@ Coverage Diff @@
## main #589 +/- ##
==========================================
- Coverage 87.98% 87.90% -0.09%
==========================================
Files 72 72
Lines 10929 11022 +93
==========================================
+ Hits 9616 9689 +73
- Misses 1313 1333 +20
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. I have a few minor comments. Can you also fix the merge conflicts when you get a chance?
bdfbcb9
to
d4c8dcf
Compare
Signed-off-by: Aaron Chong <[email protected]>
… sdf Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
…function Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Per VC, Aaron to fix printing of poses so that if |
c69920f
to
40f2575
Compare
Signed-off-by: Aaron Chong <[email protected]>
40f2575
to
9ac3504
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great! Just a few more minor comments.
Signed-off-by: Aaron Chong <[email protected]>
…eparse Signed-off-by: Aaron Chong <[email protected]>
e901780
to
8602180
Compare
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Reparse was added in #589 to deal with the possibility that the meaning of an Element's value depends on the attributes in the element and those attributes might be different when reparenting. However, this does not apply when cloning since there will be no change in the attributes in the cloned element. --------- Signed-off-by: Arjo Chakravarty <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]> Signed-off-by: Addisu Z. Taddese <[email protected]> Co-authored-by: Steve Peters <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]>
🎉 New feature
Related to #252. This has been considered as more favorable than #581 (closed).
Summary
Param
values can now be parsed differently according to their parentElement
's attributes. This is being used byPose
in this PR.//pose[@degrees='true']
, otherwise it is parsed as radians by default.Valid poses look like so,
Implementation details,
SetParentElement
andGetParentElement
, modifiedElement::Clone
,Element::Copy
to handle setting parent elements for each child value or attribute.Reparse
function toParam
, to be called when parentElement
attributes have been changed manually, and changes to its value need to be reflected.SetParentElement
attempts to reparse previous string-ified values using new parent element attributes.ignoreParentAttribute
flag, for when the value of theParam
was set explicitly using theSet<T>
function. The desired behavior would be that explicitly set values should not be affected byReparse
, while valuesSetFromString
, should take into account of parentElement
attributes.Test it
Checklist
sh tools/code_check.sh
)another open pull request
to support the maintainers
Note to maintainers: Remember to use Squash-Merge